package Task;

/**
 * 实现 Runnable, 重写 run
 */
public class Demo4 implements Runnable{
    @Override
    public void run() {
        System.out.println("run线程");
    }

    public static void main(String[] args) {
        Demo4 d1=new Demo4();
        new Thread(d1).start();//将实例对象作为Thread的参数传进去
        System.out.println("main线程");
    }
}
